package com.kh.samr.entity.expert;

import com.kh.samr.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Set;

/**
 * 专家信息
 *
 * @author Harry
 * @date 2020/12/28
 */
@ApiModel(description = "专家信息")
@Table(name = "ep_expert_info")
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExpertInfo extends BaseEntity {
	
	private static final long serialVersionUID = 2828207108361176695L;
	
	/**
	 * 专家基础信息
	 */
	@OneToOne(cascade = CascadeType.DETACH)
	private BaseInfo baseInfo;
	
	/**
	 * 专家研究方向信息
	 */
	@OneToOne(cascade = CascadeType.DETACH)
	private ExpertResearchDirection expertResearchDirection;
	
	/**
	 * 从事行业信息
	 */
	@OneToOne(cascade = CascadeType.DETACH)
	private Industry industry;
	
	/**
	 * 所在企事业单位信息
	 */
	@OneToOne(cascade = CascadeType.DETACH)
	private OrganizedBy organizedBy;
	
	/**
	 * 国内教育经历信息集合
	 */
	@OneToMany(cascade = CascadeType.DETACH)
	private Set<DomesticEducation> domesticEducations;
	
	/**
	 * 国外教育经历信息集合
	 */
	@OneToMany(cascade = CascadeType.DETACH)
	private Set<ForeignEducation> foreignEducations;
	
	/**
	 * 工作履历信息集合
	 */
	@OneToMany(cascade = CascadeType.DETACH)
	private Set<WorkHistory> workHistories;
	
	/**
	 * 参加会议及论文信息集合
	 */
	@OneToMany(cascade = CascadeType.DETACH)
	private Set<MeetingAndThese> meetingAndTheses;
	
	/**
	 * 学术兼职信息集合
	 */
	@OneToMany(cascade = CascadeType.DETACH)
	private Set<AcademicJob> academicJobs;

	/**
	 * 期刊论文信息集合
	 */
	@OneToMany(cascade = CascadeType.DETACH)
	private Set<JournalThese> journalTheses;

	/**
	 * 学术评审信息集合
	 */
	@OneToMany(cascade = CascadeType.DETACH)
	private Set<AcademicReview> academicReviews;
}
